package cn.shopping.service.impl.vouchers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.shopping.dao.vouchers.vouchersMapper;
import cn.shopping.pojo.cash_coupon;
import cn.shopping.pojo.coupons;
import cn.shopping.pojo.shopping_voucher;
import cn.shopping.pojo.voucher;
import cn.shopping.service.vouchers.vouchersService;

@Service
public class vouchersServiceImpl implements vouchersService{

	@Autowired
	private vouchersMapper vouchersmappers;

	@Override
	public List<voucher> getvouchers() {
		return vouchersmappers.selvouchers();
	}

	@Override
	public List<coupons> getcoupons() {
		return vouchersmappers.selcoupons();
	}

	@Override
	public List<shopping_voucher> getshopping_voucher() {
		return vouchersmappers.selshopping_voucher();
	}

	@Override
	public List<cash_coupon> getcash_coupon() {
		return vouchersmappers.selcash_coupon();
	}

	@Override
	public boolean delcash_coupon() {
		boolean flag = false;
		if (vouchersmappers.delcash_coupon()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean delcoupons() {
		boolean flag = false;
		if (vouchersmappers.delcoupons()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean delshopping_voucher() {
		boolean flag = false;
		if (vouchersmappers.delshopping_voucher()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean delvoucher() {
		boolean flag = false;
		if (vouchersmappers.delvoucher()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean selvcount() {
		boolean flag = false;
		if (vouchersmappers.selvcount()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean selccount() {
		boolean flag = false;
		if (vouchersmappers.selccount()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean selscount() {
		boolean flag = false;
		if (vouchersmappers.selscount()>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean selcscount() {
		boolean flag = false;
		if (vouchersmappers.selcscount()>0) {
			flag=true;
		}
		return flag;
	}
}
